{{ await Mode("TPL").Render("@"+KUO.CLASS+"/"+TPLtemp+"/head",KUO,THIS) }}
    <div class="neirong">
        <div class="layui-container">
            <div class="layui-row">
                <div class="layui-col-md8 layui-col-xs12">
                    <div class="center ">
                        <h1>
                            {{KUO.$DATA}}
                        </h1>
                    </div>

                </div>
              
            {{ await Mode("TPL").Render("@"+KUO.CLASS+"/"+TPLtemp+"/right",KUO,THIS) }}
            </div>

        </div>
    </div>

{{ await Mode("TPL").Render("@"+KUO.CLASS+"/"+TPLtemp+"/foot",KUO,THIS) }}

<script>
function Slideshow(NODE) {
    var tupiandiyi = $(NODE + ' img:first');
    if(tupiandiyi.length < 1){
        return ;
    }
    var img = new Image();
    img.src = tupiandiyi.attr("src");
    img.onload = function () {
        var widht = $(NODE).width();
        var bili = widht / this.width;
        var height = this.height * bili;
        var carousel = layui.carousel.render({
            elem: NODE,
            width: '100%',
            height: height + 'px',
            arrow: window.screen.width > 750 ? 'always' : 'none',
            indicator: window.screen.width > 750 ? "inside" : "none",
            trigger: "mouseover",
            interval: 5500,
            autoplay: true
        });
        carousel.QTU =true;
        carousel.DATA ={status: 1,data:[],start:0};
        carousel.Node = NODE + ' img';
        carousel.startX = 0;
        carousel.startY = 0;
        carousel.moveEndX = 0;
        carousel.moveEndY = 0;
        $(carousel.Node).each(function(index,tttt){
            carousel.DATA.data.push({alt:$(tttt).attr("alt"), pid: 109+index, src: $(tttt).attr("src"), thumb: ""});
        });
        $(carousel.Node).on("touchstart", function (e) {
            if (e.cancelable) {
                if (!e.defaultPrevented) {
                    e.preventDefault()
                }
            }
            carousel.startX = e.originalEvent.changedTouches[0].pageX;
            carousel.startY = e.originalEvent.changedTouches[0].pageY
        });
        $(carousel.Node).on("touchend", function (e) {
            if (e.cancelable) {
                if (!e.defaultPrevented) {
                    e.preventDefault()
                }
            }
            carousel.moveEndX = e.originalEvent.changedTouches[0].pageX;
            carousel.moveEndY = e.originalEvent.changedTouches[0].pageY;
            var X = carousel.moveEndX - carousel.startX;
            var Y = carousel.moveEndY - carousel.startY;
            if(X == 0 && Y == 0){
                if(carousel.QTU){
                    var gg = $(this).attr("src");
                    for(var xx in carousel.DATA.data){
                        var dd = carousel.DATA.data[xx];
                        if(dd.src == gg){
                            carousel.DATA.start = xx;
                        }
                    }

                    layer.photos({
                        photos: carousel.DATA 
                        
                    });

                }else{
                    var href = $(this).attr("href");
                    if (typeof (href) != "undefined") {
                        window.location.href = href
                    }
                }
                
            }   
            if (X > 5) {
                carousel.slide("sub")
            } else {
                if (X < -5) {
                    carousel.slide()
                }
            }
            if (Y > 50) {
                $("html,body").animate({
                    scrollTop: document.body.scrollTop -= 158
                }, Y * 1)
            } else {
                if (Y < -50) {
                    $("html,body").animate({
                        scrollTop: document.body.scrollTop += 158
                    }, -Y * 1)
                }
            }
        });
    }
}
var height = 0;

$(function () {
    var width = $("body").width();
    if (width <= 768) {
        if ($("#zuozhede1").length > 0) {
            var html = $("#zuozhede1").html();
            $("#zuozhede1").remove();
            $("#zuozhede").html('<div class="ycenter">' + html + '</div>');

        }
    }
    Slideshow('#test1');

    layui.rate.render({
        elem: '.layui-rate-node'
        ,readonly: true
        ,value: 2.5 
        ,half: true 
      
    });

    $(".postform").change(function (vv) {
        window.location.href = $(this).val();

    });
    $(".gengduocd").click(function () {
        if ($(".header ul").hasClass("layui-hide-xs")) {
            $(".header ul").removeClass("layui-hide-xs");
            if (height > 0) {
                $(".header ul").animate({
                    "max-height": height
                }, 300);
            } else {
                height = $(".header ul").height();
                $(".header ul").css({
                    "max-height": height
                });
            }

        } else {


            $(".header ul").animate({
                "max-height": '0px'
            }, 300, function () {

                $(".header ul").addClass("layui-hide-xs");
            });
        }

    });
});
</script>